package cn.tx.controller;

import cn.tx.constant.MessageConstant;
import cn.tx.entity.Result;
import cn.tx.service.LoginService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Snake Eyes
 * @PROJECT_NAME: health_parent
 * @DESCRIPTION:
 * @USER: 11647
 * @DATE: 2021/9/7 22:38
 * @Email: 1164763541@qq.com
 */
@RestController
@RequestMapping("login")
public class LoginController {
    @Reference
    private LoginService loginService;
    @RequestMapping("check.do")
    public Result login(@RequestBody Map loginInfo){
            loginService.login(loginInfo);
        return  new Result(true,MessageConstant.LOGIN_SUCCESS);
    }
}
